#ifndef _WOWSTRING_H
#define _WOWSTRING_H

class WoWString : public string
{
public:
	 // = { -61, -92 };
	static char UML_A[2];

	// = { -61, -68 };
	static char UML_O[2]; 

	// = { -61, -74 };
	static char UML_U[2];

	WoWString(const char* txt) : string(txt)
	{
	}
	WoWString() : string()
	{
	}

	int Replace(char patt, char* rep)
	{
		stringstream temp;
		const char* gt = new char[strlen(_Myptr()) + 1];
		strcpy((char*)gt, _Myptr());
		int cnt = 0;
		for(ui32 i = 0; i < strlen(gt); ++i)
		{
			if(gt[i] == patt)
			{
				temp << rep;
				cnt++;
			}
			else
				temp << gt[i];
		}
		clear();
		delete [] gt;
		gt = new char[temp.str().length() + 1];
		strcpy((char*)gt, temp.str().c_str());
		for(ui32 a = 0; a < strlen(gt); ++a)
			push_back(gt[a]);
		push_back(0);
		delete [] gt;
		return cnt;
	}

	char* finish();

	WoWString& operator<<(char* txt)
	{
		(string)(*this) += txt;
		return (*this);
	}
	WoWString& operator<<(ui32& val)
	{
		char tmp[15];
		sprintf(tmp, "%u", val);
		(string)(*this) += tmp;
		return (*this);
	}
	WoWString& operator<<(i32 val)
	{
		char tmp[15];
		sprintf(tmp, "%i", val);
		(string)(*this) += tmp;
		return (*this);
	}
	WoWString& operator<<(float val)
	{
		char tmp[20];
		sprintf(tmp, "%f", val);
		(string)(*this) += tmp;
		return (*this);
	}
};	

#endif